<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head lang="en">
  <meta charset="UTF-8">
  <script type="text/javascript">
	
  		/* window.onload=function(){
  			setTimeout(function(){
  				console.log("加载完成");
  			},1000)
  		}
		debugger; */
		
		function toHdfs(event){
			hdfsForm=document.getElementById("hdfsForm");
			event.preventDefault();
			hdfsForm.action="/localToHdfs";
			hdfsForm.method="POST";
			hdfsForm.submit();
		}
		
		function toLocal(event){
			hdfsForm=document.getElementById("hdfsForm");
			event.preventDefault();
			debugger;
			hdfsForm.action="/hdfsToLocal";
			hdfsForm.method="GET";
			hdfsForm.submit();
		}
		
	</script>
</head>
<body>
<center>
<div style="border:1px solid gray;width:700px;height:50px;background:rgba(0,0,0,0.3)">
	<form action='/uploadFile' method="post" enctype="multipart/form-data">
		<input type="file" name="file"/>
		<input type="text" name="hdfsPath" placeholder="hdfs 路径">
		<input type="submit" value="上传"/>
	</form>
</div>

</br>
<hr>
</br>

<div style="border:1px solid gray;width:700px;height:50px;background:rgba(0,0,0,0.3)">
	<form action='/downloadFile' method="post">
		<input type="text" name="hdfsPath" placeholder="hdfs 路径"/>
		<input type="text" name="downloadPath" placeholder="本地路径,例如：D:\\psc.jpg">
		<input type="submit" value="下载"/>
	</form>
</div>

</br>
<hr>
</br>

<div style="border:1px solid gray;width:700px;height:50px;background:rgba(0,0,0,0.3)">
	<form id="hdfsForm">
		<input type="text" name="hdfsPath" placeholder="hdfs 路径"/>
		<input type="text" name="localPath" placeholder="本地路径,例如：D:\\psc.jpg">
		<input type="button" id="Hdfs" value="本地上传到hdfs" onclick="toHdfs(event);"/>
		<input type="button" id="Local" value="hdfs下拉到本地" onclick="toLocal(event);"/>
	</form>
</div>
</center>
</body>
</html>